package drp.snowbell.exception;

import org.apache.log4j.Logger;

public class CatchException {
	private static Logger logger = Logger.getLogger(CatchException.class);

	public static void take(Exception e) {
		logger.error(e);
	}

	public static void take(Class<?> clazz, Exception e) {
		Logger mylogger = Logger.getLogger(clazz);
		mylogger.error(e);
	}

	public static void warn(Class<?> clazz, String message) {
		Logger mylogger = Logger.getLogger(clazz);
		mylogger.warn(message);
	}

	public static void info(Class<?> clazz, String message) {
		Logger mylogger = Logger.getLogger(clazz);
		mylogger.info(message);
	}

	public static void debug(Class<?> clazz, String message) {
		Logger mylogger = Logger.getLogger(clazz);
		mylogger.debug(message);
	}

	public static void error(Class<?> clazz, String message) {
		Logger mylogger = Logger.getLogger(clazz);
		mylogger.error(message);
	}

	public static void error(Class<?> clazz, Exception e) {
		Logger mylogger = Logger.getLogger(clazz);
		mylogger.error(e);
	}
}
